<template>
  <div id="app">
    <loading v-show="loading" />
<!--    <transition name="van-slide-right">-->
      <router-view />
<!--    </transition>-->
  </div>
</template>

<script>

import Loading from '@/components/loading.vue'
import { mapGetters } from 'vuex'

export default {
  name: 'App',
  components: { Loading },
  computed: {
    ...mapGetters(['loading']),
    getRandomElementFromArray() {
      const arr = ['van-fade', 'van-slide-up', 'van-slide-down', 'van-slide-left', 'van-slide-right']
      // 生成一个随机索引，范围是 0 到数组长度减一
      const randomIndex = Math.floor(Math.random() * arr.length)

      // 返回对应随机索引的元素
      return arr[randomIndex]
    }
  },
  mounted() {
    document.body.removeChild(document.getElementById('loading'))
  },
  methods: {
  }
}
</script>

<style>

</style>
